<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>2-27template模板</title>
</head>
<body>
<div id="app">
    <p>{{title}}</p>
    <my-component></my-component>
</div>
<template id="tmp">
    <p>{{title}}</p>
</template>
</body>
<script src="./js/vue.js"></script>
<script>
    Vue.component('my-component',{
        template:"#tmp",
        data() {
            return {
                title:"组件title"
            }
        }
    })

    new Vue({
        el:"#app",
        data:{
            title:'非组件title'
        }
    })
</script>
</html>